Optimal. Leaf size=45 \[ -\frac {i a \cos ^2(c+d x)}{2 d}+\frac {a \sin (c+d x) \cos (c+d x)}{2 d}+\frac {a x}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {3486, 2635, 8} \[ -\frac {i a \cos ^2(c+d x)}{2 d}+\frac {a \sin (c+d x) \cos (c+d x)}{2 d}+\frac {a x}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 3486
Rubi steps
\begin {align*} \int \cos ^2(c+d x) (a+i a \tan (c+d x)) \, dx &=-\frac {i a \cos ^2(c+d x)}{2 d}+a \int \cos ^2(c+d x) \, dx\\ &=-\frac {i a \cos ^2(c+d x)}{2 d}+\frac {a \cos (c+d x) \sin (c+d x)}{2 d}+\frac {1}{2} a \int 1 \, dx\\ &=\frac {a x}{2}-\frac {i a \cos ^2(c+d x)}{2 d}+\frac {a \cos (c+d x) \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 48, normalized size = 1.07 \[ \frac {a (c+d x)}{2 d}+\frac {a \sin (2 (c+d x))}{4 d}-\frac {i a \cos ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.67, size = 23, normalized size = 0.51 \[ \frac {2 \, a d x - i \, a e^{\left (2 i \, d x + 2 i \, c\right )}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.53, size = 23, normalized size = 0.51 \[ \frac {2 \, a d x - i \, a e^{\left (2 i \, d x + 2 i \, c\right )}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.32, size = 42, normalized size = 0.93 \[ \frac {-\frac {i a \left (\cos ^{2}\left (d x +c \right )\right )}{2}+a \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.48, size = 38, normalized size = 0.84 \[ \frac {{\left (d x + c\right )} a + \frac {a \tan \left (d x + c\right ) - i \, a}{\tan \left (d x + c\right )^{2} + 1}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.23, size = 22, normalized size = 0.49 \[ \frac {a\,x}{2}+\frac {a}{2\,d\,\left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.16, size = 41, normalized size = 0.91 \[ \frac {a x}{2} + \begin {cases} - \frac {i a e^{2 i c} e^{2 i d x}}{4 d} & \text {for}\: 4 d \neq 0 \\\frac {a x e^{2 i c}}{2} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________